Repository navigation
Freeze the clock in the conference archiving regression tests - #524
Conversation
TestConferenceArchiving built its fixtures from the real clock with date spans of a few days to a few weeks. On some days of the year those spans straddle New Year and the schema rejects them as multi-year conferences: the boundary test failed from 30 December into 1 January, and the past, future, extended-deadline and timezone tests have their own windows in November, January and February. An autouse fixture now pins the clock mid-year for the whole class. With the clock fixed, the boundary test asserts the actual behaviour instead of only checking for a bool: a deadline one hour ago is still open in AoE and has passed in UTC. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016a2XGjJgh5Shvhnbc1LL3t
for more information, see https://pre-commit.ci
|
Routine review 1. RequestNo linked issue; the PR's own words: freeze the clock for 2. Checked against
3. Needs your decisionNone. The boundary-test rewrite is named in the PR body and stays inside the file being fixed. 4. FindingsImportant: None. Nits:
5. TestsThe invariant ("no fixture date span crosses a year boundary, whatever the real date") is covered by the autouse I ran the base and changed versions of the file with the whole session frozen at each listed window (a
So the base fails and the change passes in every window I could reproduce. Change, real clock: GitHub statuses on 6. Bounds
Generated by Claude Code |
TestConferenceArchivingintests/regression/test_conference_archiving.pybuilt its fixtures from the real clock, using date spans of a few days to a few weeks. On some days of the year those spans cross New Year, and the schema rejects them with "Are you sure this is a multi-year conference?".Failure windows found by running the file under a frozen clock:
test_archive_boundary_conditions: 30 Dec to 1 Jantest_identify_past_conferences,test_bulk_archiving_process: about 18 to 21 Nov and 6 to 9 Febtest_archive_preserves_data_integrity: about 6 to 9 Febtest_archive_with_extended_deadline: about 29 Nov to 1 Dectest_archive_with_timezone_handling: about 8 to 9 JanChange
test_archive_boundary_conditionsnow checks the real behaviour instead of only asserting that the result is a bool. A deadline one hour ago is still open in AoE (notimezone) and has passed in UTC.Tests
tests/regression/test_conference_archiving.py: 14 passed on the real clock, and also with the clock frozen at 2026-11-02, 2026-11-19, 2026-11-30, 2026-12-31 20:00, 2027-01-01 00:30, 2027-01-08 and 2027-02-07.uvx ruff@0.4.4 check: clean.black@24.4.2 --check: unchanged.Generated by Claude Code